﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Org.Eurekaa.DNJ.Helpers
{
    public static class DNJCache
    {
        public static T Get<T>(string key)
        {
            object o = System.Web.HttpContext.Current.Cache.Get(key);
            if (o != null && o is T) return (T)o;

            return default(T);
        }

        public static void Add(string key, object value)
        {
            System.Web.HttpContext.Current.Cache[key] = value;
        }

    }
}
